package com.example.demo.service;

import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.index.reindex.DeleteByQueryRequest;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface DocService {
    void add(IndexRequest indexRequest) throws IOException;
    void update(UpdateRequest updateRequest) throws IOException;
    void delete(DeleteRequest deleteRequest) throws IOException;
    void deleteByQuery(DeleteByQueryRequest deleteByQueryRequest) throws IOException;
    void batch(BulkRequest bulkRequest) throws IOException;
    SearchResponse search(SearchRequest searchRequest) throws IOException;
}
